package com.kaili.basic.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.basic.pojo.dto.*;
import com.kaili.basic.pojo.entity.BaseOutStoreDetailEntity;
import com.kaili.basic.pojo.entity.OutboundApplication;
import com.kaili.basic.pojo.entity.OutboundApplicationExport;

import java.util.List;
import java.util.Map;

/**
 * Created by xxx on 2019-03-07.
 */
public interface OutboundApplicationService {
    //添加出库申请
    int addOutboundApplication(OutboundApplicationAddDto outboundApplicationAddDto);

    //删除出库申请
    int deleteOutboundApplication(OutboundApplication outboundApplication);

    //删除出库申请
    int deleteOutboundApplications(BusinessOperationDeleteDto deleteDto);

    //修改出库申请
    int updateOutboundApplication(OutboundApplicationUpdateDto outboundApplicationUpdateDto);

    //条件查询获取出库申请详细信息
    Page<OutboundApplication> queryOutboundApplication(Page<OutboundApplication> page, OutboundApplicationQueryDto outboundApplication);

    //id查询获取出库申请详细信息
    OutboundApplication queryOutboundApplicationById(Long applyId);

    //确认或者取消
    int updateAffirmOrCancel(OutboundApplication outboundApplication);

    //出库操作后修改出库申请信息
    int updateOrderOutbound(List<BaseOutStoreDetailAddDTO> detailList, String requestCode);

    //出库审核通过后修改可退货的信息（数量，体积等）
    int updateOrderOutboundByAudit(List<BaseOutStoreDetailEntity> detailList);

    //退货操作后修改出库申请信息
    int updateOrderOutboundReturn(List<OutboundReturnProductDto> returnProductList, String requestCode);

    //查询当前数据库中的最大ID
    Long getMaxApplyId();

    //出库时查询仓库可出库存
    Long queryWarehouseInventory(OutboundInventoryQueryDto outboundInventoryQueryDto);

    //导出
    List<OutboundApplicationExport> queryOutboundApplicationExport(OutboundApplicationQueryDto outboundApplicationQueryDto);
}
